package com.app.mvvmkotlindemo.request

import androidx.lifecycle.MutableLiveData
import com.app.mvvmkotlindemo.bean.JwtTokenBean
import com.everyline.baselibrary.base.viewmodel.BaseViewModel
import com.everyline.baselibrary.state.ResultState
import com.app.mvvmkotlindemo.network.HttpRequestManger
import com.everyline.baselibrary.ext.request

/**
 * Created by on 2021/1/29.
 * 天天挂线
 *  746608431@qq.com
 *  描述:TODO
 */

class RequestRegisterModel : BaseViewModel() {

    var driverRegisteData =
        MutableLiveData<ResultState<JwtTokenBean?>>()


    fun driverRegister(validStr: String, map: Map<String, String>) {
        request(
            { HttpRequestManger.apiService.driverRegister(validStr, map) },
            driverRegisteData,
            true
        )

    }
}